/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package vn.webapp.model;

import java.io.Serializable;
import javax.persistence.AssociationOverride;
import javax.persistence.AssociationOverrides;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 *
 * @author Tonytran
 */
@Entity
@Table(name = "busyteacher")
//@AssociationOverrides({@AssociationOverride(name = "teachers",joinColumns = @JoinColumn(name = "id")) })
public class BusyToTeachers implements Serializable
{
    
    @Id
    @GeneratedValue
    @Column(name = "busyteacher_id")
    private int busyteacher_id;
    
    @Column(name = "teacher_id")
    private int teacher_id;
    
    @Column(name = "day")
    private int day;

    @Column(name = "slot")
    private int slot;
    
    @Column(name = "session_id")
    private int session_id;
    
    @Column(name = "time_range")
    private int time_range;
    
    @ManyToOne
    @JoinColumn(name="teacher_id", insertable = false, updatable = false, nullable=false)
    private TeachersToBusy teachersToBusy;
    
    public int getBusyteacher_id() {
        return busyteacher_id;
    }

    public void setBusyteacher_id(int busyteacher_id) {
        this.busyteacher_id = busyteacher_id;
    }

    public int getTeacher_id() {
        return teacher_id;
    }

    public void setTeacher_id(int teacher_id) {
        this.teacher_id = teacher_id;
    }

    public int getDay() {
        return day;
    }

    public void setDay(int day) {
        this.day = day;
    }

    public int getSlot() {
        return slot;
    }

    public void setSlot(int slot) {
        this.slot = slot;
    }

    public int getSession_id() {
        return session_id;
    }

    public void setSession_id(int session_id) {
        this.session_id = session_id;
    }

    public int getTime_range() {
        return time_range;
    }

    public void setTime_range(int time_range) {
        this.time_range = time_range;
    }

    public TeachersToBusy getTeachersToBusy() {
        return teachersToBusy;
    }

    public void setTeachersToBusy(TeachersToBusy teachersToBusy) {
        this.teachersToBusy = teachersToBusy;
    }
    
}
